Skip to content

Unit 2: add Prettier, ESLint, Stylelint, EditorConfig + commit lockfile#4

Open
stradichenko wants to merge 1 commit intomainfrom
unit-02-linting-and-developer-tooling
Open

Unit 2: add Prettier, ESLint, Stylelint, EditorConfig + commit lockfile#4
stradichenko wants to merge 1 commit intomainfrom
unit-02-linting-and-developer-tooling

Conversation

@stradichenko
Copy link
Copy Markdown
Owner

Summary

  • Add baseline developer tooling: .editorconfig, .nvmrc, Prettier 3 flat config (.prettierrc.json, .prettierignore), ESLint 9 flat config (eslint.config.mjs) with prefer-const / no-var / eqeqeq / no-console (warn except .error), Stylelint extending stylelint-config-standard, and a PostCSS config with autoprefixer + postcss-preset-env stage 2.
  • Update package.json: drop broken seo-audit / validate-seo / build:advanced references; add lint, lint:fix, format, format:check scripts.
  • Remove package-lock.json from .gitignore so installs are deterministic. Whole-repo formatting is intentionally not applied here — later units format their own changes.

Test plan

  • npm run lint exits 0 (warnings allowed; errors fail).
  • npm run format:check passes on configs and any new files.
  • npm install produces a package-lock.json that matches the committed one.

Part of the PKB-theme modernization batch (15 units).

- Add .editorconfig (UTF-8, LF, 2-space JS/CSS/HTML/TOML; tabs for Go).
- Add .nvmrc pinning Node LTS.
- Prettier 3 flat config (.prettierrc.json, .prettierignore).
- ESLint 9 flat config (eslint.config.mjs): prefer-const, no-var, eqeqeq,
  no-unused-vars (warn), no-console (warn except .error), browser+node env.
- Stylelint extending stylelint-config-standard (.stylelintrc.json,
  .stylelintignore).
- PostCSS config: autoprefixer + postcss-preset-env stage 2.
- package.json: drop broken seo-audit / validate-seo / build:advanced refs;
  add lint, lint:fix, format, format:check scripts.
- Remove package-lock.json from .gitignore so installs are deterministic.
- Whole-repo formatting is intentionally NOT applied here — later units
  format their own changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant